A Metrowerks CodeWarrior project sample demonstrating how to set up a project to create a driver file with multiple USB class driver modules merged into a single file.
Description
This project merges the USBTabletModule and the USBHIDKeyboardModuleSample, into a single driver file "USBMultModuleSample". Note that support for multiple class modules in a single driver file is only available with USB v1.2 and greater. For earlier releases of USB, only the first class module in the library is recognized.
Making the Project
This sample was built using the Metrowerks CodeWarrior Pro 4, IDE v3.2 environment and the Mac OS USB DDK v1.2. Also required, is the Universal Interfaces and Libraries 3.1.
To make this project, first go to both the USBTabletDriver and KeyboardModule folders and building those drivers. This project assumes the presence of these 2 built drivers in the ":Extensions-MCWBuilt:" folder. The resulting driver is placed into the ":Extensions-MCWBuilt:" folder and is named USBMultModuleSample.
The sample project was created using the following steps:
1. Create a new Target within the project.
2. Open the Target Preferences Panels and make the following settings
2a. Target Settings: Enter the desired "Target Name" of the merged driver.
Set the Linker popup to "MacOS Merge"
2b. File Mappings: Under the Mapping Info panel, enter 'ndrv' as a file type and click the "Add" button. By doing this, the project target accepts source files of type 'ndrv'.
2c. MacOS Merge: Set the Project type to "Shared Library. Set the creator to 'usbd'. Set the file type 'ndrv'. Ensure that the "Copy Code Fragments" radio box is checked. You might also want to check the "Copy Resources" radio box.
3. Set the source files to be the shared library files which contain the drivers to be merged.
Bug Reports:
If you find any bugs, please send them to "usb@isg.apple.com" and include "Attn: Rich Kubota" and I will try to address them.
Questions??:
For any questions which you may have with this sample or with Mac OS USB, please submit them to either the Mac OS USB mailing list, usb@apple.com, or to Worldwide Macintosh Developer Technical Support (WWDTS), dts@apple.com. If you are not familiar with the recent changes to the WWDTS support plans, please check them out at the Developer Programs web page,
<http://developer.apple.com/programs/>
To subscribe to the Mac OS USB Developer mailing list, use the following URL.
Thanks to Ron Wagner on the USB mailing list for his tip on adding an 'ndrv' file type in the File Mapping option so that built 'ndrv' driver files can be included directly into this project file.
For any questions which you may have with this sample or with Mac OS USB, please submit them